#include<stdio.h>
#include<math.h>
int main()
{
	char ch;
	ch=getchar();
	if(ch>='a'&&ch<='z')
		printf("lower");
	else if(ch>='A'&&ch<='Z')
		printf("upper");
	else if(ch>='0'&&ch<='9')
		printf("digit");
	else 
		printf("other");
	
		
	
	
	return 0;
}
